#ifndef FLOATTASKITEM_H
#define FLOATTASKITEM_H

#include <DApplication>
#include <DGuiApplicationHelper>
#include <QCheckBox>

class FloatTaskItem : public QWidget
{
    Q_OBJECT
public:
    static void initFloatTaskItems();

    explicit FloatTaskItem();
    ~FloatTaskItem() override;
    void setTask(const QString &title, bool isSaved);
    bool isChecked();

protected:
    virtual void paintEvent(QPaintEvent *event) override;
    virtual bool event(QEvent *event) override;


private:
    QColor m_backgroundColor;
    QCheckBox checkBox;
    QPoint movePoint;

signals:

public slots:

private slots:
    void onThemeChanged(DGuiApplicationHelper::ColorType type);
    void onChecked(bool state);
    void onAppQuit();
};



#endif // FLOATTASKITEM_H
